using System;
using System.Collections.Generic;
using System.Windows.Media;
namespace MicroMsg.UI.UserContrl
{
	public class RichTextHelper
	{
		private static List<BaseInlineProcess> ProcessFactory;
		public static List<InLineResult> GetInLineResult(string text, int nFontSize = 0, Brush brushLink = null, Brush brushText = null)
		{
			List<InLineResult> list = new List<InLineResult>();
			list.Add(new InLineResult
			{
				mText = text
			});
			for (int i = 0; i < RichTextHelper.ProcessFactory.get_Count(); i++)
			{
				RichTextHelper.ProcessFactory.get_Item(i).ConfigTextApearence(nFontSize, brushLink, brushText);
				RichTextHelper.ProcessFactory.get_Item(i).ProcessText(list);
			}
			return list;
		}
		static RichTextHelper()
		{
			// Note: this type is marked as 'beforefieldinit'.
			List<BaseInlineProcess> list = new List<BaseInlineProcess>();
			list.Add(new SimileyProc());
			list.Add(new EmojProc());
			list.Add(new UrlProcess());
			list.Add(new ComWebLinkProc());
			list.Add(new TextProcess());
			RichTextHelper.ProcessFactory = list;
		}
	}
}
